﻿<Window x:Class="TriviaViews.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:v="clr-namespace:TriviaViews"
        xmlns:converter="clr-namespace:TriviaViews.Converters"
        
        Title="MainWindow" Height="700" Width="600" DataContext="{Binding Main, Source={StaticResource Locator}}">
    <Window.Resources>
        <Style TargetType="TabItem" x:Key="tabItemStyle">
            <Setter Property ="BorderThickness" Value="2"></Setter>
            <Setter Property="BorderBrush" Value="Blue"></Setter>
            <Setter Property="FontSize" Value="20"></Setter>
        </Style>
        <LinearGradientBrush x:Key="ButtonBrush" StartPoint="0,0" EndPoint="1,1">
            <GradientStop Color="DarkGray" Offset="0"></GradientStop>
            <GradientStop Color="#CCCCFF" Offset="0.5"></GradientStop>
            <GradientStop Color="DarkGray" Offset="1"></GradientStop>

        </LinearGradientBrush>
        <Style TargetType="{x:Type Button}">
            <Setter Property="Background" Value="{StaticResource ButtonBrush}" ></Setter>
            <Setter Property="Width" Value="auto"></Setter>
            <Setter Property="Margin" Value="10"></Setter>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Width="{TemplateBinding Width}" 
     Height="{TemplateBinding Height}" ClipToBounds="True">

                            <!-- Outer Rectangle with rounded corners. -->
                            <Rectangle x:Name="outerRectangle" 
        HorizontalAlignment="Stretch" 
        VerticalAlignment="Stretch" 
        Stroke="{TemplateBinding Background}" 
        RadiusX="20" RadiusY="20" StrokeThickness="5" 
        Fill="Transparent" />

                            <!-- Inner Rectangle with rounded corners. -->
                            <Rectangle x:Name="innerRectangle" 
        HorizontalAlignment="Stretch" 
        VerticalAlignment="Stretch" Stroke="Transparent" 
        StrokeThickness="20" 
        Fill="{TemplateBinding Background}" 
        RadiusX="20" RadiusY="20"   />

                            <!-- Present Content (text) of the button. -->
                            <DockPanel Name="myContentPresenterDockPanel">
                                <ContentPresenter x:Name="myContentPresenter" Margin="20" 
          Content="{TemplateBinding  Content}" 
          TextBlock.Foreground="Black" />
                            </DockPanel>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Window.Resources>
    <Grid>

        <TabControl>

            <TabItem Header="Start Page" Style="{StaticResource tabItemStyle}">
                <ContentControl Content="{Binding EntranceViewModel}"></ContentControl>
            </TabItem>
            <TabItem Style="{StaticResource tabItemStyle}" Header="Score Board">
                <ContentControl Content="{Binding ScoreBoardViewModel}"></ContentControl>
            </TabItem >
            <TabItem Header="Settings" Style="{StaticResource tabItemStyle}">
                <TabControl>
                    <TabItem Header="Add Difficulty and\or Topic">
                        <ContentControl Content="{Binding DifficultyTopicViewModel}"></ContentControl>
                    </TabItem>
                    <TabItem Header="Add Question" >
                        <ContentControl Content="{Binding AddQuestionVModel}"></ContentControl>
                    </TabItem>

                </TabControl>
            </TabItem>
            <TabItem Header="About" Style="{StaticResource tabItemStyle}">
                <StackPanel>
                    <Label>Created By:Rahelly</Label>
                    <Label>Year:2012</Label>
                </StackPanel>
            </TabItem>
        </TabControl>
    </Grid>
</Window>
